﻿<%@ Page Language="C#" MasterPageFile="~/Management/ManagementMasterPage.master" AutoEventWireup="true" Inherits="Management_Admin_AdminList" Title="逸品--管理端" Codebehind="AdminList.aspx.cs" %>

<%@ Register src="../../Controls/CategoryCascadingDropDown.ascx" tagname="CategoryCascadingDropDown" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" Runat="Server">
	<div>
		<asp:DropDownList ID=ddlRole runat=server OnSelectedIndexChanged="ddlRole_SelectedIndexChanged" AutoPostBack="True">
		</asp:DropDownList>
	</div>
	<div>
		<asp:ListView ID=lvAdmin runat=server OnItemCommand="lvAdmin_ItemCommand">
			<LayoutTemplate>
				<table>
					<tr>
					
						<td>用户名</td>
						<td>角色</td>
						<td>时间</td>
						<td></td>
					</tr>
					<asp:PlaceHolder ID=itemPlaceHolder runat=server></asp:PlaceHolder>
				</table>
			</LayoutTemplate>
			<ItemTemplate>
				<tr>
					<td>
						<%# Eval("User.tel") %></td>
					<td>
						<%# Eval("RoleCategory.Name") %></td>
					<td>
						<%# Eval("CreateTime") %></td>
					<td>
						<asp:Button ID=btnEdit runat="server" Text="修改" CommandName="OnEdit" CommandArgument=<%# Eval("UserRoleId") %> />
						<asp:Button ID=btnDelete runat="server" Text="删除" CommandName="OnDelete" OnClientClick="return confirm('你确定要删除该用户的权限吗?');" CommandArgument=<%# Eval("UserRoleId") %> />
					</td>
				</tr>
			</ItemTemplate>
		</asp:ListView>
	</div>
	<div>
		<asp:HiddenField ID=hfUserRoleId runat="server" />
		用户名：<asp:TextBox ID=txtAdmin runat="server"></asp:TextBox>
		角色：<uc1:CategoryCascadingDropDown ID="ddlUserRoleCategory" runat="server" ShowLv2Category=False TopCategoryName=Role />
		<asp:Button ID=btnInsert runat="server" Text="新增" onclick="btnInsert_Click" />
		<asp:Button ID=btnUpdate runat="server" Text="修改" Visible=false onclick="btnUpdate_Click" />
		<asp:Button ID=btnCancel runat="server" Text="取消" Visible=false onclick="btnCancel_Click" />
	</div>
</asp:Content>

